#{extends 'magicBox.html' /}

#{set 'title'}${project.name}'s Charts #{/set}
<div class="overlay" name="@{ProductBacklogs.showGraph(project.id,0)}">Project overall Chart</div>
#{if (sprints.size()==0)}
#{note}There are No Sprints.#{/note}
#{/if}
#{else}
	#{list items:sprints, as:'sprint'}
#{if sprint.project.hasComponents()}
		#{if (sprint.id==runningSprint) }
			<div class="greenBg" name="@{Sprints.charts(sprint.id)}">Sprint ${sprint.sprintNumber}#{drop 'sprint-' + sprint.id /}<a href="#" onclick="overlayOpen('@{SprintBacklog.show_graph(sprint.id,0)}')" title="View the whole company burndown chart?"><img src="@{'public/images/famfam/chart.png'}" alt=[chart]""/></a>
			#{if connected.in(sprint.project).can("editSprint")}
<a href="#" onclick="overlayOpen('@{Sprints.projectshow(sprint.id)}')"><img src="/public/images/famfam/pencil.png" /></a>

#{/if}
			</div>
		#{/if}
		#{else}
		#{if (sprint.ended) }
			<div class="redBg" name="@{Sprints.charts(sprint.id)}">Sprint ${sprint.sprintNumber} <a href="#" onclick="overlayOpen('@{SprintBacklog.show_graph(sprint.id,0)}')" title="View the whole company burndown chart?"><img src="@{'public/images/famfam/chart.png'}" alt=[chart]""/></a>
			#{if connected.in(sprint.project).can("editSprint")}

<img class="dim"src="/public/images/famfam/pencil.png" />

#{/if}
			</div>
		#{/if}
		#{else}
		<div class="yellowBg" name="@{Sprints.charts(sprint.id)}">Sprint ${sprint.sprintNumber}#{drop 'sprint-' + sprint.id /}<a href="#" onclick="overlayOpen('@{SprintBacklog.show_graph(sprint.id,0)}')"title="View the whole company burndown chart?"><img src="@{'public/images/famfam/chart.png'}" alt=[chart]""/></a>
			#{if connected.in(sprint.project).can("editSprint")}

<a href="#" onclick="overlayOpen('@{Sprints.projectshow(sprint.id)}')"><img src="/public/images/famfam/pencil.png" /></a>

#{/if}
			</div>#{/else}
		#{/else}




#{/if}
#{else}
		#{if (sprint.id==runningSprint) }
			<div class="greenBg overlay" name="@{SprintBacklog.show_graph(sprint.id,0)}">Sprint ${sprint.sprintNumber}#{drop 'sprint-' + sprint.id /}<a href="#" onclick="overlayOpen('@{SprintBacklog.show_graph(sprint.id,0)}')" title="View the whole company burndown chart?"><img src="@{'public/images/famfam/chart.png'}" alt=[chart]""/></a>
			#{if connected.in(sprint.project).can("editSprint")}
<a href="#" onclick="overlayOpen('@{Sprints.projectshow(sprint.id)}')"><img src="/public/images/famfam/pencil.png" /></a>

#{/if}
			</div>
		#{/if}
		#{else}
		#{if (sprint.ended) }
			<div class="redBg overlay" name="@{SprintBacklog.show_graph(sprint.id,0)}">Sprint ${sprint.sprintNumber} <a href="#" onclick="overlayOpen('@{SprintBacklog.show_graph(sprint.id,0)}')" title="View the whole company burndown chart?"><img src="@{'public/images/famfam/chart.png'}" alt=[chart]""/></a>
			#{if connected.in(sprint.project).can("editSprint")}

<img class="dim"src="/public/images/famfam/pencil.png" />

#{/if}
			</div>
		#{/if}
		#{else}
		<div class="yellowBg overlay" name="@{SprintBacklog.show_graph(sprint.id,0)}">Sprint ${sprint.sprintNumber}#{drop 'sprint-' + sprint.id /}<a href="#" onclick="overlayOpen('@{SprintBacklog.show_graph(sprint.id,0)}')"title="View the whole company burndown chart?"><img src="@{'public/images/famfam/chart.png'}" alt=[chart]""/></a>
			#{if connected.in(sprint.project).can("editSprint")}

<a href="#" onclick="overlayOpen('@{Sprints.projectshow(sprint.id)}')"><img src="/public/images/famfam/pencil.png" /></a>

#{/if}
			</div>#{/else}
		#{/else}




#{/else}
#{/list}
#{/else}
